package com.tuo51.foudation.constant;

import lombok.Setter;

/**
 * *******************************
 * Created by Tim.
 * form com.matt
 * on 2018/7/10
 * *******************************
 */
public class StaffConstant {
    public enum Status {
        ON_JOB(0, "WEB"),
        DISMISSION(1, "离职");

        @Setter
        private int code;

        @Setter
        private String value;

        Status(int code, String value){
            this.code = code;
            this.value = value;
        }

        public int codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public Status get(int code){
            for (Status status : values()) {
                if (status.codeOf()==code)
                    return status;
            }
            return null;
        }
    }

}
